package com.situ.skymall.admin.api.service;

import com.situ.utils.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@FeignClient(value = "skymall-gateway", contextId =  "image-api")
public interface ImageFeignService {

    @PostMapping(value = "/api/v1/images/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    ResponseEntity<JsonResult<String>> upload(@RequestPart("file") MultipartFile file);
}